Delete an array in multidimensional array php

48

Delete an array in multidimensional array php -

function removeElementWithValue($array, $key, $value){
     foreach($array as $subKey => $subArray){
          if($subArray[$key] == $value){
               unset($array[$subKey]);
          }
     }
     return $array;
}

Comments

Submit
0 Comments